@extends('layouts.default')
@section('content') 
<div class="box">
    <header>
        <div class="icons">
            <i class="fa fa-list"></i>
        </div>
        <h5>{{ Lang::get('messages.insur_docs_report')}}</h5>
        <div id="print"></div>
    </header>
    <div class="body">         
        <h2>SGS</h2>
        @foreach ($values as $v)
        @if(strtotime($v->sgs)!= 0000-00-00)
        @if ( Helpers\Helper::status($v->sgs, $date, $limit_date) == 5) 
        <p class="text-warning">{{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.sgs_limit')}} {{$v->sgs}}</p>
        @elseif (Helpers\Helper::status($v->sgs, $date, $limit_date) == 21) 
        <p class="text-danger"> {{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.sgs_expired')}} {{$v->sgs}}</p>
        @endif
        @endif
        @endforeach

        <h2>TPL</h2>
        @foreach ($values as $v)
        @if(strtotime($v->tpl)!= 0000-00-00)
        @if ( Helpers\Helper::status($v->tpl, $date, $limit_date) == 5) 
        <p class="text-warning">{{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.tpl_limit')}}{{$v->tpl}}</p>
        @elseif (Helpers\Helper::status($v->tpl, $date, $limit_date) == 21) 
        <p class="text-danger"> {{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.tpl_expired')}} {{$v->tpl}}</p>
        @endif
        @endif
        @endforeach           

        <h2>Kasko</h2>
        @foreach ($values as $v)
        @if(strtotime($v->kasko)!= 0000-00-00)
        @if ( Helpers\Helper::status($v->kasko, $date, $limit_date) == 5) 
        <p class="text-warning">{{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.kasko_limit')}}{{$v->kasko}}</p>
        @elseif (Helpers\Helper::status($v->kasko, $date, $limit_date) == 21) 
        <p class="text-danger"> {{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.kasko_expired')}} {{$v->kasko}}</p>
        @endif
        @endif
        @endforeach

        <h2>{{Lang::get('messages.inter_permission')}}</h2>
        @foreach ($values as $v)
        @if(strtotime($v->inter_permis)!= 0000-00-00)
        @if ( Helpers\Helper::status($v->inter_permis, $date, $limit_date) == 5) 
        <p class="text-warning">{{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.inter_permis_limit')}} {{$v->inter_permis}}</p>
        @elseif (Helpers\Helper::status($v->inter_permis, $date, $limit_date) == 21) 
        <p class="text-danger"> {{ $v->Make }}{{ $v->License}} 
            {{Lang::get('messages.inter_permis_expired')}} {{$v->inter_permis}}</p>
        @endif           
        @endif
        @endforeach
    </div>
</div>
@stop
